Skip to content

fix: update logparser for stable JSON log pattern hashing#223

Merged
mayankpande88 merged 1 commit into
mainfrom
fix/update-logparser-dependency
Mar 10, 2026
Merged

fix: update logparser for stable JSON log pattern hashing#223
mayankpande88 merged 1 commit into
mainfrom
fix/update-logparser-dependency

Conversation

@mayankpande88

Copy link
Copy Markdown
Contributor

Description

Updates github.com/nudgebee/logparser to pick up nudgebee/logparser#16 which fixes JSON log pattern hashing.

Previously, normalizeJSONLog dumped all JSON field values into the pattern extractor, causing:

  • Empty hash collisions: Large data blobs (HTML, stack traces) overwhelmed the extractor, producing d41d8cd9... (MD5 of empty string) for all affected logs
  • Unstable hashes: Metadata fields (timestamps, trace IDs, file paths) changed between log entries from different pods, producing different hashes for the same error

Now extracts patterns only from recognized message fields (msg, message, error, err, reason, log, text) with case-insensitive key matching.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • 33/33 logparser tests pass
  • 459 real production JSON logs from Loki validated with 0 empty-hash violations
  • Covers Go zerolog, Python structured logs, and custom JSON formats

Picks up fix/json-log-pattern-hashing (PR #16) which stabilizes
JSON log pattern hashing by extracting only message fields.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@mayankpande88 mayankpande88 merged commit 47c4cd2 into main Mar 10, 2026
1 check passed
@mayankpande88 mayankpande88 deleted the fix/update-logparser-dependency branch March 10, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants